package roborally.program.commands;

import roborally.model.Robot;

/**
 * A class for dealing with move-commands: (move).     
 * 
 * @version	1.0
 * @author  Pieter Robberechts	(1e Bach Informatica)
 * @author	Jeroen Sanders		(1e Bach Informatica)
 *
 */
public class Move extends BasicCommand {

	/**
	 * Initialize this new move-command with a line number.
	 * 
	 */
	public Move(int lineNb) {
		super(lineNb);
	}

	/**
	 * Return a textual representation of this move-command,
	 * formatted in accordance with its position in the program.
	 * 
	 * @return	The result is a pretty formatted string of this move-command,
	 * 			taking in account his relative position in the program.
	 * 			| result == getIndentation(indentationLevel) + "(move)"
	 */
	@Override
	public String prettyFormat(int indentationLevel) {
		return getIndentation(indentationLevel) + "(move)";
	}

	/**
	 * Execute the move method on the given robot.
	 * 
	 * @effect	The given robot moves one position forward.
	 * 			| robot.move()
	 */
	@Override
	public void execute(Robot robot) throws IllegalArgumentException {
		super.execute(robot);
		robot.move();		
	}

}
